package com.ylr.blog.framework.controller.web;

import java.util.Map;

import com.ylr.base.common.tool.Result;
import com.ylr.blog.framework.service.HotBlogService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import org.springframework.web.bind.annotation.*;

import com.ylr.blog.framework.entity.HotBlogEntity;

import javax.annotation.Resource;



/**
 * Created by IntelliJ IDEA.
 *
 * @author wyw
 * date: 2023-05-25 23:11:49
 * className: HotBlogWebController
 * version: 1.0
 * description:
 */
@RestController
@RequestMapping("/web/hot-blog")
public class HotBlogWebController {

    private static final Logger log = LoggerFactory.getLogger(HotBlogWebController.class);

    @Resource(name = "hotBlogService")
    private HotBlogService hotBlogService;

    /**
     * 保存
     */
    @PostMapping("/save")
    public Result<Object> saveHotBlog(@RequestBody HotBlogEntity hotBlog) {
//        hotBlogService.save(hotBlog);

        return Result.success();
    }

    /**
     * 列表
     */
    @GetMapping("/page/list")
    public Result<Object> pageHotBlogList(@RequestParam Map<String, Object> params) {
//        PageUtils page = hotBlogService.queryPage(params);

        return Result.success();
    }


    /**
     * 信息
     */
    @GetMapping("/get")
    public Result<Object> getHotBlog(@RequestParam("blogId") Long blogId) {
//		HotBlogEntity hotBlog = hotBlogService.getById(blogId);

        return Result.success();
    }

    /**
     * 修改
     */
    @PostMapping("/update")
    public Result<Object> updateHotBlog(@RequestBody HotBlogEntity hotBlog) {
//		hotBlogService.updateById(hotBlog);

        return Result.success();
    }

    /**
     * 删除
     */
    @DeleteMapping("/delete")
    public Result<Object> deleteHotBlog(@RequestBody Long[] blogIds) {
//		hotBlogService.removeByIds(Arrays.asList(blogIds));

        return Result.success();
    }

}
